/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "USER_CMD_CODE", catalog = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "UserCmdCode.findAll", query = "SELECT u FROM UserCmdCode u"),
    @NamedQuery(name = "UserCmdCode.findById", query = "SELECT u FROM UserCmdCode u WHERE u.id = :id"),
    @NamedQuery(name = "UserCmdCode.findByUsername", query = "SELECT u FROM UserCmdCode u WHERE u.username = :username"),
    @NamedQuery(name = "UserCmdCode.findByBlackCmdList", query = "SELECT u FROM UserCmdCode u WHERE u.blackCmdList = :blackCmdList"),
    @NamedQuery(name = "UserCmdCode.findByWhiteCmdList", query = "SELECT u FROM UserCmdCode u WHERE u.whiteCmdList = :whiteCmdList"),
    @NamedQuery(name = "UserCmdCode.findByGeneral1", query = "SELECT u FROM UserCmdCode u WHERE u.general1 = :general1"),
    @NamedQuery(name = "UserCmdCode.findByGeneral2", query = "SELECT u FROM UserCmdCode u WHERE u.general2 = :general2"),
    @NamedQuery(name = "UserCmdCode.findByGeneral3", query = "SELECT u FROM UserCmdCode u WHERE u.general3 = :general3")})
public class UserCmdCode implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private BigDecimal id;
    @Size(max = 20)
    @Column(name = "USERNAME")
    private String username;
    @Size(max = 2000)
    @Column(name = "BLACK_CMD_LIST")
    private String blackCmdList;
    @Size(max = 2000)
    @Column(name = "WHITE_CMD_LIST")
    private String whiteCmdList;
    @Size(max = 2000)
    @Column(name = "GENERAL1")
    private String general1;
    @Size(max = 2000)
    @Column(name = "GENERAL2")
    private String general2;
    @Size(max = 2000)
    @Column(name = "GENERAL3")
    private String general3;

    public UserCmdCode() {
    }

    public UserCmdCode(BigDecimal id) {
        this.id = id;
    }

    public BigDecimal getId() {
        return id;
    }

    public void setId(BigDecimal id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getBlackCmdList() {
        return blackCmdList;
    }

    public void setBlackCmdList(String blackCmdList) {
        this.blackCmdList = blackCmdList;
    }

    public String getWhiteCmdList() {
        return whiteCmdList;
    }

    public void setWhiteCmdList(String whiteCmdList) {
        this.whiteCmdList = whiteCmdList;
    }

    public String getGeneral1() {
        return general1;
    }

    public void setGeneral1(String general1) {
        this.general1 = general1;
    }

    public String getGeneral2() {
        return general2;
    }

    public void setGeneral2(String general2) {
        this.general2 = general2;
    }

    public String getGeneral3() {
        return general3;
    }

    public void setGeneral3(String general3) {
        this.general3 = general3;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UserCmdCode)) {
            return false;
        }
        UserCmdCode other = (UserCmdCode) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.UserCmdCode[ id=" + id + " ]";
    }
    
}
